from rank.feature import Feature


class QualityFeature(Feature):
    def get_feature(self, global_resource, request_content, response_content):
        quality_feature = {}
        merge_result = response_content.get_value("merge_result")

        for api_id, api in merge_result.items():
            quality_feature[api_id] = api["followers_num"]

        response_content.store_value("quality_feature", quality_feature)
